Skip to content

Update batch publishing to fallback to t0/now if timestamp is unset#140

Draft
mjohanse-emr wants to merge 1 commit into
mainfrom
users/mjohanse/timestamp_fallback_batch
Draft

Update batch publishing to fallback to t0/now if timestamp is unset#140
mjohanse-emr wants to merge 1 commit into
mainfrom
users/mjohanse/timestamp_fallback_batch

Conversation

@mjohanse-emr

@mjohanse-emr mjohanse-emr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What does this Pull Request accomplish?

AB#3926275

Updates the Publish Measurement Batch process to perform the following fall-backs if the timestamp parameter is left unset.

  1. If we are publishing a waveform that has a t0, assign t0 for the timestamp.
  2. If we are publishing a waveform that has no t0 or publishing any other type, assign the current time for the timestamp.

Why should this Pull Request be merged?

The non-batch case already performs these fall-backs, so this PR is bringing the batched publishing case up to speed. We would like the behavior to be as consistent as possible when timestamp is not specified.

What testing has been done?

I created batched versions of the unit tests that cover this timestamp fall-back behavior. All acceptance and unit tests pass.

Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
) -> None:
timestamp = datetime.now(tz=std_datetime.timezone.utc)
waveform_values = [1.0, 2.0, 3.0]
analog_waveforms = [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these tests use more than one waveform for completeness?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant